package au.com.iglootech.winerymap.ui.presenter.winerymanage;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import au.com.iglootech.core.IGTIView;
import au.com.iglootech.core.IGTPresenter;
import au.com.iglootech.winerymap.entity.WineryInfo;
import au.com.iglootech.winerymap.service.WineryInfoService;
import au.com.iglootech.winerymap.ui.view.winerymanage.ManageWineryTab.IPresenter;

/**
 * 
 * @author Nicholas Zhu
 * 
 */
@Component
@Scope("request")
public class ManageWineryPresenter extends IGTPresenter implements IPresenter {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5051426731817266961L;

	private IGTIView view;

	@Autowired
	private WineryInfoService wineryInfoService;

	@Override
	public List<WineryInfo> getAllWinery() {
		return wineryInfoService.findAll();
	}

	@Override
	public void setView(final IGTIView view) {
		this.view = view;
	}

}
